package com.itheima.mStringBuilder;

import java.util.Scanner;

/*
     键盘接收一个字符串,程序判断出该字符串是否是对称字符串,并在控制台打印是或不是
 */
public class StringBuilderDemo01 {
    public static void main(String[] args) {
        //1.键盘录入一个字符串
        Scanner sc = new Scanner(System.in);
        String s = sc.nextLine();
        //2.将录入的字符串反转
        StringBuilder sb = new StringBuilder(s);
        sb.reverse();
        String reversesb = sb.toString();
        if (s.equals(reversesb)) {
            System.out.println("是对称字符串");
        } else {
            System.out.println("不是对称字符串");
        }
    }
}
